/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ComboBoxModel;

import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author Levix
 */
public class ComponentsLoader {


    public JTable TableModelLoader(JTable table ){
        table.setModel(new javax.swing.table.DefaultTableModel(null,
            new String [] {
            "Product Name","Quantity"
            }
            ));
            return table;
    }

    public   void  loadTable(Object [] products,JTable table){

     ((DefaultTableModel) table.getModel()).addRow(products);
        table.setVisible(true);



    }


    

}
